﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace GH.Web.UionReport
{
    public partial class ModelWorkerPrint : System.Web.UI.Page
    {
        public DataTable dtSource1 = new DataTable();
        public DataTable dtSource2 = new DataTable();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string theDate = Session["SelectCurrentYear"].ToString();
                this.lblCurrentYear.Text = theDate;
                GH.BLL.ModelWorker bllModelWorker1 = new GH.BLL.ModelWorker();
                string strWhere1 = "  1=1";
                strWhere1 += " AND  劳动模范.年份='" + theDate + "'";
                dtSource1 = bllModelWorker1.GetList1(strWhere1).Tables[0];
                this.Repeater1.DataSource = dtSource1;
                this.Repeater1.DataBind();

                string strWhere2 = "  1=1";
                strWhere2 += " AND  先进集体统计表.年份='" + theDate + "'";
                dtSource2 = bllModelWorker1.GetList2(strWhere2).Tables[0];
                this.Repeater2.DataSource = dtSource2;
                this.Repeater2.DataBind();

            }
        }
    }
}
